home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_id-utils.idb / usr / freeware / src / id-utils / patches.z / patches
Encoding:
Text File  |  1998-10-28  |  2.5 KB  |  97 lines

  1. *** ./src/lid.c    Tue Aug  6 22:43:28 1996
  2. --- ../id-utils-3.2/./src/lid.c    Mon Jun 15 16:09:37 1998
  3. ***************
  4. *** 165,170 ****
  5. --- 165,174 ----
  6.   
  7.   int radix_flag = radix_all;
  8.   
  9. + /* vi_flag to print out - cut/paste for vi? */
  10. + int vi_flag = 0;
  11.   /* If nonzero, ignore differences in alphabetic case while matching.  */
  12.   
  13.   int ignore_case_flag = 0;
  14. ***************
  15. *** 273,278 ****
  16. --- 277,283 ----
  17.                           is a range expressed as `N..M'.  If N is omitted, it\n\
  18.                           defaults to 1, if M is omitted it defaults to MAX_USHRT\n\
  19.     -a, --ambiguous=LEN   find tokens whose names are ambiguous for LEN chars\n\
  20. +   -v, --vi_output       cause the output to allow simple vi cut/paste of files \n\
  21.   \n\
  22.     -x, --hex             only find numbers expressed as hexadecimal\n\
  23.     -d, --decimal         only find numbers expressed as decimal\n\
  24. ***************
  25. *** 301,307 ****
  26.   
  27.     for (;;)
  28.       {
  29. !       int optc = getopt_long (argc, argv, "f:F:a:k:R:S:ilrwsxdo",
  30.                     long_options, (int *) 0);
  31.         if (optc < 0)
  32.       break;
  33. --- 306,312 ----
  34.   
  35.     for (;;)
  36.       {
  37. !       int optc = getopt_long (argc, argv, "f:F:a:k:R:S:ilrwsxdov",
  38.                     long_options, (int *) 0);
  39.         if (optc < 0)
  40.       break;
  41. ***************
  42. *** 371,376 ****
  43. --- 376,385 ----
  44.         radix_flag |= radix_oct;
  45.         break;
  46.   
  47. +     case 'v':
  48. +       vi_flag = 1;
  49. +       break;
  50.       default:
  51.         usage ();
  52.       }
  53. ***************
  54. *** 563,569 ****
  55.         maybe_relative_file_name (file_name, *flinkv++, cw_dlink);
  56.         gid_FILE = fopen (file_name, "r");
  57.         if (gid_FILE == 0)
  58. !     error (0, errno, "can't open `%s'", file_name);
  59.   
  60.         line_number = 0;
  61.         while (fgets (&line[1], sizeof (line), gid_FILE))
  62. --- 572,581 ----
  63.         maybe_relative_file_name (file_name, *flinkv++, cw_dlink);
  64.         gid_FILE = fopen (file_name, "r");
  65.         if (gid_FILE == 0)
  66. !     {
  67. !       error (0, errno, "can't open `%s'", file_name);
  68. !       continue;
  69. !     }
  70.   
  71.         line_number = 0;
  72.         while (fgets (&line[1], sizeof (line), gid_FILE))
  73. ***************
  74. *** 579,585 ****
  75.           }
  76.         else if (!word_match (name, line))
  77.           continue;
  78. !       printf ("%s:%d:%s", file_name, line_number, &line[1]);
  79.       }
  80.         fclose (gid_FILE);
  81.       }
  82. --- 591,601 ----
  83.           }
  84.         else if (!word_match (name, line))
  85.           continue;
  86. !     
  87. !        if (vi_flag)
  88. !           printf ("+%d %s:%s", line_number, file_name, &line[1]);
  89. !       else
  90. !           printf ("%s:%d:%s", file_name, line_number, &line[1]);
  91.       }
  92.         fclose (gid_FILE);
  93.       }
  94.